package com.mspbots.web.storage;

import org.springframework.core.io.Resource;
import org.springframework.http.codec.multipart.FilePart;
import reactor.core.publisher.Mono;

import java.nio.file.Path;
import java.util.stream.Stream;

/**
 * com.mspbots.web.core.storage.StorageService
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/9/20
 */
public interface StorageService {

    void init();

    Mono store(String teamsUserId, Mono<FilePart> filePartMono);

    Stream<Path> loadAll();

    Path load(String filename);

    Resource loadAsResource(String filename);

    void deleteAll();
}
